<script language="javascript" type="text/javascript">

    function getValueSingle(kode, nama) {
        try {
            parent.parent._obj_fSendValue(kode, nama, 'id_supplier', 'nama_supplier');
        }
        catch(e) { alert(e.message); }
        parent.parent.focus();

<?php echo CloseGB(false); // close grebox?>

                    }
</script>

<h3 class="title-popup">Daftar Agen</h3>

<div style="padding: 10px;">
    <div class="DivTable">

        <form name="fCari" id="fCari" action="" method="get" >
            <table class="GridTableFilter">
                <tr>
                    <td>
                        <?php
                        echo $fp;
                        ?>
                    </td>
                </tr>
            </table>
        </form>
        <br class="bersih" />

        <table class="GridTable" style="width:100%;">

            <tr class="GridHeader">
                <td>No.</td>
                <td>Nama supplier</td>
            </tr>
            <?php

            if ($numRows > 0) {
                $nomor = $offset;
                foreach ($result as $row) {
                    $nomor++;

                    $styleTR = "GridItem1";

                    ?>
            <tr class="<?php echo  $styleTR;?>" onclick="getValueSingle('<?php echo $row->id_supplier;?>', '<?php echo $row->nama_supplier;?>')">
                <td><?php echo  $nomor;?></td>
                <td><?php echo  $row->nama_supplier;?><input type="hidden" name="vNama" value="<?php echo str_replace("'", "\'", $row->nama_supplier); ?>" /></td>
            </tr>
                    <?php
                }

            }
            else {
                ?>
            <tr class="GridItem1">
                <td colspan="6">Tidak ada data</td>
            </tr>

                <?php
            }
            ?>
        </table>
    </div>

    <br class="bersih" />
</div>